$(function () {
    $("[name='khh.nbgs.id']").gsjgtree('1',
        {
            onChange:function (newValue, oldValue) {
                $.get($.webPath() + "/organ/khh/get_nextpxh", {nbgsId:newValue}, function (response, status, xhr) {
                    $('[numberboxname="khh.pxh"]').val(response);
                    $("[name='khh.pxh']").val(response);
                }, "text");
            }
        });

/*    $("[name='khh.zhlx.id']").sjzdcombobox("zhlx", {
        onSelect:function (record) {
            if (record.z == "存款") {
                $("[name='khh.zhlx.id']").val("存款");
                $("#_bzjhskm").css('display', 'none');
                $("#_ckhskm").css("display", '');
            }  if (record.z == "保证金") {
                $("[name='khh.zhlx.id']").val("保证金");
                $("#_ckhskm").css('display', 'none');
                $("#_bzjhskm").css("display", '');
            }
        }
    });*/
       $("[name='khh.zhlx.id']").sjzdcombobox("zhlx");
    /*  if($("[name='khh.zhlx.id']").sjzdcombobox("zhlx")=="存款") {
     $("#_ckhskm").css('display', 'none');
     }else if($("[name='khh.zhlx.id']").sjzdcombobox("zhlx")=="保证金") {
     $("#_bzjhskm").css('display', 'none');}*/


    $("[name='khh.drzh.id']").sjzdcombobox("drzh");

    if (!$("#khh_id").val())
        $.get($.webPath() + "/organ/khh/get_nextpxh", {nbgsId:$("#khh_nbgs_id").combotree('getValue')}, function (response, status, xhr) {
            $('[numberboxname="khh.pxh"]').val(response);
            $("[name='khh.pxh']").val(response);
        }, "text");

})